package com.wcong.service.impl;

import com.wcong.dao.BooksMapper;
import com.wcong.pojo.Book;
import com.wcong.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wcong
 * @version 1.0
 * @date 2020-09-19 15:27
 */
@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BooksMapper booksMapper;

    @Override
    public Book getById(Integer id){
        return booksMapper.getById(id);
    }

    @Override
    public List<Book> getByList(){
        return booksMapper.getByList();
    }

    @Override
    public Integer insertBook(Book book){
        return booksMapper.insertBook(book);
    }

    @Override
    public Integer deleteBookById(Integer id){
        return booksMapper.deleteBookById(id);
    }

    @Override
    public Integer updateBook(Book book){
        return booksMapper.updateBook(book);
    }

}
